package com.atguigu.gmall.index.service;

import com.atguigu.gmall.common.bean.ResponseVo;
import com.atguigu.gmall.index.feign.GmallPmsClient;
import com.atguigu.gmall.pms.entity.CategoryEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author fan
 * @since 2021-09-13
 */
@Service
public class IndexService {
    @Autowired
    private GmallPmsClient pmsClient;
    public List<CategoryEntity> queryLvl1Categories(){
        ResponseVo<List<CategoryEntity>> responseVo = this.pmsClient.queryCategory(0L);
        return responseVo.getData();
    }
}
